import { RouteRecordRaw } from 'vue-router';
import Login from '@/views/Login/index.vue';

let routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/login',
    name: "login",
    component: Login,
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/category",
    name: 'category',
    component: () => import('@/views/Category/index.vue'),

  },
  {
    path: "/ListDetails",
    name: "ListDetails",
    component: () => import('@/views/ListDetails/index.vue'),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import('@/views/Detail/index.vue'),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/home",
    name: "home",
    component: () => import('@/views/Home/index.vue'),
    meta: {

    }
  },
  {
    path: "/pay",
    name: "pay",
    component: () => import('@/views/Pay/index.vue'),
    meta: {
      login: true
    }
  },
  {
    path: "/search/:keyword?/:_stat_search?",
    name: "search",
    component: () => import('@/views/Search/index.vue'),
    meta: {
      hideTabBar: true
    }
  },
  {
    path: "/shopCart",
    name: "shopCart",
    component: () => import('@/views/ShopCart/index.vue'),
    meta: {
      login: true
    },
  },
  {
    path: "/address",
    name: "address",
    component: () => import('@/views/ShopCart/address/index.vue'),
    meta: {

    }
  },
  {
    path: "/user",
    name: "user",
    component: () => import('@/views/User/index.vue'),
    meta: {
      login: true

    }
  },
  {
    path: "/worthBuy",
    name: "worthBuy",
    component: () => import('@/views/WorthBuy/index.vue'),
    meta: {

    }
  },
  {
    path: "/register",
    name: "register",
    component: () => import('@/views/Register/index.vue'),
    meta: {

    }
  },
  {
    path: "/logindetail",
    name: "loginDetail",
    component: () => import('@/views/LoginDetail/index.vue'),
    meta: {

    }
  }

];

export default routes;